import TaskStateBtn from '../component/taskStateBtn'

export const columns = [
    {
        title: '序号',
        dataIndex: 'serial',
        key: 'serial',
        align: 'center',
        width: 50,
        ellipsis: true,
    },
    {
        title: '任务id',
        dataIndex: 'taskId',
        key: 'taskId',
        align: 'center',
        width: 80,
        ellipsis: true,
        render: (text) => {
            return (
                <div>
                    <span style={{ color: '#4096ff' }}>{text}</span>
                </div>
            )
        },
    },
    {
        title: '任务类名',
        dataIndex: 'taskClassName',
        key: 'taskClassName',
        align: 'center',
        width: 200,
        ellipsis: true,
    },
    {
        title: '任务描述',
        dataIndex: 'taskDesc',
        key: 'taskDesc',
        width: 200,
        align: 'center',
        ellipsis: true,
    },
    {
        title: 'CRON表达式',
        dataIndex: 'cronExpression',
        key: 'cronExpression',
        align: 'center',
        width: 150,
        ellipsis: true,
    },
    {
        title: '任务状态',
        dataIndex: 'taskState',
        key: 'taskState',
        align: 'center',
        width: 120,
        ellipsis: true,
        render: (taskState) => {
            return (
                <TaskStateBtn taskInfo={taskState}></TaskStateBtn>
            )
        },
    },
];